<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<script type="text/javascript">
    $(function() {
        mallProductRecommendHistoryListModule.init();
    });
    var mallProductRecommendHistoryListModule = (function(){

        var module = {
            init :function(){
            },
            back : function(id){
                var url = 'mallProductRecommendHistoryController.do?back&id='+id;
                $.ajax({
                    async : true,
                    type : 'POST',
                    dataType:'json',
                    url : url,// 请求的action路径
                    success : function(data) {
                        if (data.success) {
                            $.messager.alert('成功','还原成功！','',function(){
                                reloadTable();
                            })
                        }else{
                            $.messager.alert('错误',data.msg)
                        }
                    },
                    error : function() {// 请求失败处理函数

                    }
                });
            }
        }
        return module;
    })();
</script>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="mallProductRecommendHistoryList" title="推荐历史"  actionUrl="mallProductRecommendHistoryController.do?datagrid" idField="id" fit="true" queryMode="group">
      <t:dgCol title="编号" field="id" hidden="true"></t:dgCol>
      <t:dgCol title="商品id" field="productid"   width="120"></t:dgCol>
      <t:dgCol title="商品名称" field="productname" query="true"  width="120"></t:dgCol>
      <t:dgCol title="商品图片" field="imagesrc" image="true" imageSize="50,50" width="100"></t:dgCol>
      <t:dgCol title="商品类型" field="recommendtype" query="true"   width="120"  replace="每日推荐_1,拉货宝精选_2"></t:dgCol>
      <t:dgCol title="排序" field="sort"   width="120"></t:dgCol>
      <t:dgCol title="创建时间" field="createtime" formatter="yyyy-MM-dd hh:mm:ss"  width="120"></t:dgCol>
      <t:dgCol title="创建人" field="createuserid"   width="120"></t:dgCol>
      <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
      <t:dgFunOpt funname="mallProductRecommendHistoryListModule.back(id)" title="恢复"></t:dgFunOpt>
      <t:dgToolBar title="查看" icon="icon-search" url="mallProductRecommendHistoryController.do?addorupdate" funname="detail"></t:dgToolBar>
      <t:dgDelOpt title="删除" url="mallProductRecommendHistoryController.do?del&id={id}" />
  </t:datagrid>
  </div>
 </div>